﻿using Com.JunCaiSoft.AddressManage.Dao;
using Com.JunCaiSoft.AddressManage.IDao;
using Com.JunCaiSoft.DBContext;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Com.JunCaiSoft.AddressManage
{
    public static class AddressManageServiceCollectionExtension
    {
        public static IServiceCollection AddAddressManage(this IServiceCollection services)
        {
            //添加行政区划相关注入
            services.TryAddSingleton<IAdministrativeDao>(new AdministrativeDao(services.BuildServiceProvider().GetService<MSSQLDbContext>()));

            return services;
        }
    }
}
